package com.music.controller;

import com.music.common.BaseResult;
import com.music.service.CmFriendService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("CmFriendController")
@Api(description = "关注朋友相关接口")
public class CmFriendController {
    @Autowired
    private CmFriendService cmFriendService;

    @RequestMapping(value = "insertFriend",method = RequestMethod.POST)
    public BaseResult insertFriend(Integer uId,Integer uaId){
        return cmFriendService.insertFriend(uId, uaId);
    }
    @RequestMapping(value = "findNameById",method = RequestMethod.POST)
    public BaseResult findNameById(Integer uId){
        return cmFriendService.findNameById(uId);
    }

    @RequestMapping(value = "findFriendByUid",method = RequestMethod.POST)
    public BaseResult findFriendByUid(Integer uId){
        return cmFriendService.findFriendByUid(uId);
    }
    @RequestMapping(value = "deleteFriendByUaid",method = RequestMethod.POST)
    public BaseResult deleteFriendByUaid(Integer uaId,Integer uId){
        return cmFriendService.deleteFriendByUaid(uaId,uId);
    }
}
